<?php
    //process dob
    function toMdyFormat($date){
        list($year,$month,$day) = explode("-", $date);
        $date=$month."/".$day."/".$year;
        return $date;
    }    
    function toYmdFormat($date){
        list($month,$day,$year) = explode("/", $date);
        $date=$year."-".$month."-".$day;
        return $date;
    }
    function ymdToTextFormat($date){
        list($date,$time) = explode(" ", $date);        
        list($year,$month,$day) = explode("-", $date);
        $date=$year."-".$month."-".$day;
        return monthToText($month)." ".$day.", ".$year." ".$time;
    }
    function ymdToTextFormat2Line($date){
        list($date,$time) = explode(" ", $date);        
        list($year,$month,$day) = explode("-", $date);
        $date=$year."-".$month."-".$day;
        return monthToText($month)." ".$day.", ".$year."<br />".$time;
    }
    function monthToText($no)
    {
        switch ($no) {
        case '01':
            return 'January';
            break;
        case '02':
            return 'February';
            break;
        case '03':
            return 'March';
            break;
        case '04':
            return 'April';
            break;
        case '05':
            return 'May';
            break;
        case '06':
            return 'June';
            break;
        case '07':
            return 'July';
            break;
        case '08':
            return 'August';
            break;
        case '09':
            return 'September';
            break;
        case '10':
            return 'October';
            break;
        case '11':
            return 'November';
            break;
        case '12':
            return 'December';
            break;

    }
}
?>